<template>
  <div id="app">
    <div id="nav">
      <router-link to="/">Home</router-link>
      <!-- <router-link to="/about/foo/foos/idea">About</router-link> -->
      |<router-link to="/about">about</router-link>
      |<router-link to="/debounce">debounce</router-link>
      |<router-link to="/dialog">dialog</router-link>
      |<router-link to="/idea">idea</router-link>
      |<router-link to="/layout">layout</router-link>
      |<router-link to="/style">style</router-link>
      |<router-link to="/throttle">throttle</router-link>
      |<router-link to="/toast">toast</router-link>
      |<router-link to="/unique">unique</router-link>
      |<router-link to="/upload">upload</router-link>
      <!-- <router-link to="{name:'About',params:{username:'jack'}}">About</router-link> -->
    </div>
    <transition name="bounce">
      <router-view />
    </transition>
  </div>
</template>
<script>
export default {
  watch: {
    $route(to, from) {
      console.log(to, from);
    }
  }
};
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
.bounce-enter-active {
  animation: bounce-in 0.5s;
}
.bounce-leave-active {
  animation: bounce-in 0.5s reverse;
}
@keyframes bounce-in {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
  }
}
</style>
